/* 资讯类 */
import ajax from '@/libs/ajax'

/**
 * 首页推荐
 * @param {*} data
 */
const API_RECOMMEND_NEWS = (data) => ajax('/pub/news/recommendNews', 'get', data)

/**
 * 新闻详情
 * @param {number} id 新闻id
 */
const API_NEWS_DETAIL = (id) => ajax(`/pub/news/detail/${id}`, 'get')

/**
 * 类目分页
 * @param {object} data 分页参数
 */
const API_CATEGORY_NEWS = (data) => ajax('/pub/news/getCategoryRecommendNews', 'get', data)

const API_CATEGORYS = (data) => ajax('/pub/getNewCategoryByParam', 'get', data)

const API_BANNER_NEWS = (data) => ajax('/pub/news/getBannerNews', 'get', data)

export {
  API_RECOMMEND_NEWS,
  API_NEWS_DETAIL,
  API_CATEGORY_NEWS,
  API_CATEGORYS,
  API_BANNER_NEWS
}
